<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
	    <meta charset="utf-8">
	    <meta http-equiv="X-UA-Compatible" content="IE=edge">
	    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
	    <meta name="description" content="">
	    <meta name="author" content="">
	    <meta name="keyword" content="">
	    <link rel="shortcut icon" href="img/favicon.png">	
	    <title></title>	
	    <!-- Icons -->
	    <link href="${pageContext.request.contextPath}/uicore/css/font-awesome.min.css" rel="stylesheet">
	    <link href="${pageContext.request.contextPath}/uicore/css/simple-line-icons.css" rel="stylesheet">	
	    <!-- Main styles for this application -->
	    <link href="${pageContext.request.contextPath}/uicore/css/style.css" rel="stylesheet">	
	    <!-- / datetime picker -->
    	<link href='${pageContext.request.contextPath}/jquerycss/datetimepicker/bootstrap-datetimepicker.min.css' media='all' rel='stylesheet' type='text/css' />
	    <!-- jquery css -->
	    <link href="${pageContext.request.contextPath}/jquerycss/jquery.dataTables.min.css" rel="stylesheet">	
	</head>

	<body class="app header-fixed sidebar-fixed aside-menu-fixed aside-menu-hidden">
	    <header class="app-header navbar">
	        <button class="navbar-toggler mobile-sidebar-toggler hidden-lg-up" type="button">☰</button>
	        <a class="navbar-brand" href="#"></a>
	        <ul class="nav navbar-nav hidden-md-down">
	            <li class="nav-item">
	                <a class="nav-link navbar-toggler sidebar-toggler" href="#">☰</a>
	            </li>
	
	            <li class="nav-item px-1">
	                <a class="nav-link" href="#">Dashboard</a>
	            </li>
	            <li class="nav-item px-1">
	                <a class="nav-link" href="#">Users</a>
	            </li>
	            <li class="nav-item px-1">
	                <a class="nav-link" href="#">Settings</a>
	            </li>
	        </ul>
	        <ul class="nav navbar-nav ml-auto">
	            <li class="nav-item hidden-md-down">
	                <a class="nav-link" href="#"><i class="icon-bell"></i><span class="badge badge-pill badge-danger">5</span></a>
	            </li>
	            <li class="nav-item hidden-md-down">
	                <a class="nav-link" href="#"><i class="icon-list"></i></a>
	            </li>
	            <li class="nav-item hidden-md-down">
	                <a class="nav-link" href="#"><i class="icon-location-pin"></i></a>
	            </li>
	            <li class="nav-item dropdown">
	                <a class="nav-link dropdown-toggle nav-link" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false">
	                    <img src="${pageContext.request.contextPath}/uicore/img/avatars/6.jpg" class="img-avatar" alt="admin@bootstrapmaster.com">
	                    <span class="hidden-md-down">admin</span>
	                </a>
	                <div class="dropdown-menu dropdown-menu-right">
	
	                    <div class="dropdown-header text-center">
	                        <strong>Account</strong>
	                    </div>
	
	                    <a class="dropdown-item" href="#"><i class="fa fa-bell-o"></i> Updates<span class="badge badge-info">42</span></a>
	                    <a class="dropdown-item" href="#"><i class="fa fa-envelope-o"></i> Messages<span class="badge badge-success">42</span></a>
	                    <a class="dropdown-item" href="#"><i class="fa fa-tasks"></i> Tasks<span class="badge badge-danger">42</span></a>
	                    <a class="dropdown-item" href="#"><i class="fa fa-comments"></i> Comments<span class="badge badge-warning">42</span></a>
	
	                    <div class="dropdown-header text-center">
	                        <strong>Settings</strong>
	                    </div>
	
	                    <a class="dropdown-item" href="#"><i class="fa fa-user"></i> Profile</a>
	                    <a class="dropdown-item" href="#"><i class="fa fa-wrench"></i> Settings</a>
	                    <a class="dropdown-item" href="#"><i class="fa fa-usd"></i> Payments<span class="badge badge-default">42</span></a>
	                    <a class="dropdown-item" href="#"><i class="fa fa-file"></i> Projects<span class="badge badge-primary">42</span></a>
	                    <div class="divider"></div>
	                    <a class="dropdown-item" href="#"><i class="fa fa-shield"></i> Lock Account</a>
	                    <a class="dropdown-item" href="#"><i class="fa fa-lock"></i> Logout</a>
	                </div>
	            </li>
	            <li class="nav-item hidden-md-down">
	                <a class="nav-link navbar-toggler aside-menu-toggler" href="#">☰</a>
	            </li>
	
	        </ul>
	    </header>	
	    <div class="app-body">
	        <div class="sidebar">
	            <nav class="sidebar-nav">
	                <ul class="nav">
	                    <li class="nav-item">
	                        <a class="nav-link" href="index.html"><i class="icon-speedometer"></i> Dashboard <span class="badge badge-info">NEW</span></a>
	                    </li>	
	                    <li class="nav-title">
	                        UI Elements
	                    </li>
	                    <li class="nav-item nav-dropdown">
	                        <a class="nav-link nav-dropdown-toggle" href="#"><i class="icon-puzzle"></i> Components</a>
	                        <ul class="nav-dropdown-items">
	                            <li class="nav-item">
	                                <a class="nav-link" href="components-buttons.html"><i class="icon-puzzle"></i> Buttons</a>
	                            </li>
	                            <li class="nav-item">
	                                <a class="nav-link" href="components-social-buttons.html"><i class="icon-puzzle"></i> Social Buttons</a>
	                            </li>
	                            <li class="nav-item">
	                                <a class="nav-link" href="components-cards.html"><i class="icon-puzzle"></i> Cards</a>
	                            </li>
	                            <li class="nav-item">
	                                <a class="nav-link" href="components-forms.html"><i class="icon-puzzle"></i> Forms</a>
	                            </li>
	                            <li class="nav-item">
	                                <a class="nav-link" href="components-modals.html"><i class="icon-puzzle"></i> Modals</a>
	                            </li>
	                            <li class="nav-item">
	                                <a class="nav-link" href="components-switches.html"><i class="icon-puzzle"></i> Switches</a>
	                            </li>
	                            <li class="nav-item">
	                                <a class="nav-link" href="components-tables.html"><i class="icon-puzzle"></i> Tables</a>
	                            </li>
	                            <li class="nav-item">
	                                <a class="nav-link" href="components-tabs.html"><i class="icon-puzzle"></i> Tabs</a>
	                            </li>
	                        </ul>
	                    </li>
	                    <li class="nav-item nav-dropdown">
	                        <a class="nav-link nav-dropdown-toggle" href="#"><i class="icon-star"></i> Icons</a>
	                        <ul class="nav-dropdown-items">
	                            <li class="nav-item">
	                                <a class="nav-link" href="icons-font-awesome.html"><i class="icon-star"></i> Font Awesome</a>
	                            </li>
	                            <li class="nav-item">
	                                <a class="nav-link" href="icons-simple-line-icons.html"><i class="icon-star"></i> Simple Line Icons</a>
	                            </li>
	                        </ul>
	                    </li>
	                    <li class="nav-item">
	                        <a class="nav-link" href="widgets.html"><i class="icon-calculator"></i> Widgets <span class="badge badge-info">NEW</span></a>
	                    </li>
	                    <li class="nav-item">
	                        <a class="nav-link" href="charts.html"><i class="icon-pie-chart"></i> Charts</a>
	                    </li>
	                    <li class="divider"></li>
	                    <li class="nav-title">
	                        Extras
	                    </li>
	                    <li class="nav-item nav-dropdown">
	                        <a class="nav-link nav-dropdown-toggle" href="#"><i class="icon-star"></i> Pages</a>
	                        <ul class="nav-dropdown-items">
	                            <li class="nav-item">
	                                <a class="nav-link" href="pages-login.html" target="_top"><i class="icon-star"></i> Login</a>
	                            </li>
	                            <li class="nav-item">
	                                <a class="nav-link" href="pages-register.html" target="_top"><i class="icon-star"></i> Register</a>
	                            </li>
	                            <li class="nav-item">
	                                <a class="nav-link" href="pages-404.html" target="_top"><i class="icon-star"></i> Error 404</a>
	                            </li>
	                            <li class="nav-item">
	                                <a class="nav-link" href="pages-500.html" target="_top"><i class="icon-star"></i> Error 500</a>
	                            </li>
	                        </ul>
	                    </li>					
						<!-- user defined Started -->
	                    <li class="nav-item nav-dropdown">
	                        <a class="nav-link nav-dropdown-toggle" href="#"><i class="icon-puzzle"></i> 系统管理 </a>
	                        <ul class="nav-dropdown-items">
	                            <li class="nav-item">
	                                <a class="nav-link" href="coreUser.jsp"><i class="icon-puzzle"></i> 人员管理 </a>
	                            </li>
	                            <li class="nav-item">
	                                <a class="nav-link" href="components-social-buttons.html"><i class="icon-puzzle"></i> Social Buttons</a>
	                            </li>
	                        </ul>
	                    </li>
						<!-- user defined end -->						
	                </ul>
	            </nav>
	        </div>
	
	        <!-- Main content -->
	        <main class="main">	
	            <!-- Breadcrumb -->
	            <ol class="breadcrumb">
	                <li class="breadcrumb-item">Home</li>
	                <li class="breadcrumb-item"><a href="#">Admin</a>
	                </li>
	                <li class="breadcrumb-item active">Dashboard</li>	
	                <!-- Breadcrumb Menu-->
	                <li class="breadcrumb-menu hidden-md-down">
	                    <div class="btn-group" role="group" aria-label="Button group with nested dropdown">
	                        <a class="btn btn-secondary" href="#"><i class="icon-speech"></i></a>
	                        <a class="btn btn-secondary" href="./"><i class="icon-graph"></i> &nbsp;Dashboard</a>
	                        <a class="btn btn-secondary" href="#"><i class="icon-settings"></i> &nbsp;Settings</a>
	                    </div>
	                </li>
	            </ol>	
	            <div class="container-fluid">
	                <div class="animated fadeIn">	                
	                    <div class="row">
	                    	<!-- user search qualification -->
	                    	<div class="col-lg-12">
	                    		 <div class="card">
	                    		 	<div class="card-header">
	                                    <i class="fa fa-align-justify"></i> 人员修改
	                                </div>
	                                <!-- person photo change -->
	                                <!-- <div class="card-block">
	                                	<form action="1" method="post" class="form-horizontal " id="">
		                                	<div class="form-group row">
			                                	<div class="input-group col-md-4">
			                                		<a href="#" ><img src="http://s.amazeui.org/media/i/demos/bw-2014-06-19.jpg?imageView/1/w/200/h/200/q/80" alt=""/></a>
			                                		<input type="hidden" >
			                                		<div>
                  										<img class="am-img-circle am-img-thumbnail" src="http://s.amazeui.org/media/i/demos/bw-2014-06-19.jpg?imageView/1/w/200/h/200/q/80" alt=""/>
			                                		</div>
			                                	</div>
			                                	<div class="input-group col-md-8">
			                                		
			                                	</div>
		                                	</div>
	                                    </form>
	                                </div> -->
	                                <!-- person photo change end -->
	                                <div class="card-block">	                                
	                                    <form id="userDetailForm" action="" method="post" class="form-horizontal ">
		                                	<div class="form-group row">
			                                	<div class="input-group col-md-4">
	                                                <span class="input-group-addon">姓&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;名</span>
			                                        <input type="text" id="allName" name="allName" class="form-control" placeholder=" 姓 名 ">
			                                        	<!-- <span class="input-group-btn">
			                                            	<input type="text" id="allName" name="allName" class="form-control" placeholder=" 姓 名 ">
			                                            </span> -->
			                                	</div>
			                                	<div class="input-group col-md-4">
	                                                <span class="input-group-addon">性&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;别</span>
                                                    <input type="radio" id="sexId" name="sexId" value="1"> 男 
                                                    <input type="radio" id="sexId" name="sexId" value="2"> 女 
			                                	</div>
			                                	
									            <div class='input-group date col-md-4 ' id='datetimepicker2'> 
		                                        	<span class="input-group-addon">出生日期</span> 
									                <input type='text' class="form-control" />  
									                <span class="input-group-addon">  
									                    <span class="glyphicon glyphicon-calendar"></span>  
									                </span>  
									            </div>  
			                                	<!-- <div class="input-group col-md-4  datetimepicker input-append ">
		                                        	<span class="input-group-addon">出生日期</span>
		                                            <input type="text" id="birthDay" name="birthDay" class="form-control" placeholder=" 出生日期 "> 
		                                            <span class="input-group-addon">  
									                    <span class="glyphicon glyphicon-calendar"></span>  
									                </span> 
			                                	</div> -->
		                                	</div>
		                                	<div class="form-group row">
			                                	<div class="input-group col-md-4">
		                                        	<span class="input-group-addon">用户名&nbsp;&nbsp;&nbsp;&nbsp;</span>
		                                            	<input type="text" id="userName" name="userName" class="form-control" readonly="readonly" placeholder=" 用户名 ">
			                                	</div>
			                                	<div class="input-group col-md-4">
		                                        	<span class="input-group-addon">座&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;机</span>
		                                            	<input type="text" id="callNo" name="callNo" class="form-control" placeholder=" 座机 ">
			                                	</div>
			                                	<div class="input-group col-md-4">
		                                        	<span class="input-group-addon">手&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;机</span>
		                                            	<input type="text" id="phoneNo" name="phoneNo" class="form-control" placeholder=" 手机 ">
			                                	</div>
		                                	</div>
		                                	<div class="form-group row">
			                                	<div class="input-group col-md-4">
		                                        	<span class="input-group-addon">职&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;务</span>
		                                            	<input type="text" id="positionId" name="positionId" class="form-control" placeholder=" 职务 ">
			                                	</div>
			                                	<div class="input-group col-md-4">
		                                        	<span class="input-group-addon">学&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;历</span>
		                                            <input type="text" id="eduLevel" name="eduLevel" class="form-control" placeholder=" 学历 ">
			                                	</div>
			                                	<div class="input-group col-md-4">
		                                        	<span class="input-group-addon">邮&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;箱</span>
		                                            	<input type="text" id="email" name="email" class="form-control" placeholder=" 邮箱 ">
			                                	</div>
			                                	<div class="input-group col-md-4">
			                                    	<!-- <button type="button" class="btn btn-primary"><i class="fa fa-search"></i> Search</button> -->
			                                	</div>
		                                	</div>
		                                	<div class="form-group row">
			                                	<div class="input-group col-md-4">
		                                        	<span class="input-group-addon">职&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;称</span>
		                                            	<input type="text" id="workId" name="workId" class="form-control" placeholder=" 职称">
			                                	</div>
			                                	<div class="input-group col-md-4">
		                                        	<span class="input-group-addon">状&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;态</span>
		                                            	<input type="text" id="valid" name="valid" class="form-control" placeholder=" 状态">
			                                	</div>
			                                	<div class="input-group col-md-4">
		                                        	<span class="input-group-addon">是否职员</span>
		                                            	<input type="text" id="isSupport" name="isSupport" class="form-control" placeholder=" 是否职员 ">
			                                	</div>
			                                	<div class="input-group col-md-4">
			                                    	<!-- <button type="button" class="btn btn-primary"><i class="fa fa-search"></i> Search</button> -->
			                                	</div>
		                                	</div>
	                                	</form>	
		                                	<div>
		                                		<div class="col-md-12 mb-2">
							                    	<ul class="nav nav-tabs" role="tablist">
							                        	<li class="nav-item">
							                                <a class="nav-link active" data-toggle="tab" href="#home4" role="tab" aria-controls="home"><i class="icon-calculator"></i>基本信息&nbsp;<span class="badge badge-success">new</span></a>
							                            </li>
							                            <li class="nav-item">
							                                <a class="nav-link" data-toggle="tab" href="#profile4" role="tab" aria-controls="profile"><i class="icon-basket-loaded"></i>支持组信息&nbsp;<span class="badge badge-pill badge-danger">29</span></a>
							                            </li>
							                            <li class="nav-item">
							                                <a class="nav-link" data-toggle="tab" href="#rolePanel" role="tab" aria-controls="messages"><i class="icon-pie-chart"></i> 角色信息</a>
							                            </li>
							                            <li class="nav-item">
							                                <a class="nav-link" data-toggle="tab" href="#levelPanel" role="tab" aria-controls="messages"><i class="icon-pie-chart"></i> 权限信息</a>
							                            </li>
							                        </ul>						
							                        <div class="tab-content">
							                            <div class="tab-pane active" id="home4" role="tabpanel">
							                                <div class="form-group row">
								                                	<div class="input-group col-md-12">
							                                        	<span class="input-group-addon">简&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;介</span>
							                                        	<textarea rows="5" cols="5"  id="shortDescription" name="shortDescription" class="form-control"></textarea>
								                                	</div>
							                                </div>
							                                <div class="form-group row">
									                            <div class="input-group col-md-4">
								                                     <span class="input-group-addon">修改人&nbsp;&nbsp;&nbsp;&nbsp;</span>
								                                         <input type="text" id="updateUserName" name="updateUserName" class="form-control" placeholder=" 修改人">
									                            </div>
									                            <div class="input-group col-md-4">
								                                	<span class="input-group-addon">修改时间</span>
								                                    <input type="text" id="updateTime" name="updateTime" class="form-control" placeholder=" 修改时间">
									                            </div>
									                            <div class="input-group col-md-4">
								                                	<span class="input-group-addon">创建时间</span>
								                                    <input type="text" id="createTime" name="createTime" class="form-control" placeholder=" 创建时间 ">
									                            </div>
									                            <div class="input-group col-md-4">
									                                <!-- <button type="button" class="btn btn-primary"><i class="fa fa-search"></i> Search</button> -->
									                            </div>
							                       			</div>
									                        <div align="center">
										                        <button type="button" class="btn btn-primary" onClick="javascript:applyUser()"><i class="fa fa-search"></i> 保  存 </button>
									                        </div>
							                       		</div>
							                        	<div class="tab-pane" id="profile4" role="tabpanel">              
	                                    					<form id="userOrgDetailForm" action="" method="post" class="form-horizontal ">
								                        	<div class="row">
								                        		<div class="col-md-4">
									                        		<div class="form-group row">
                                            							<span class="col-md-3 input-group-addon" for="select">单位</span>
											                            <select id="orgCompanyId" name="orgCompanyId" class="col-md-9 form-control">
										                                    <option value="">-请选择-</option>
										                                </select>
		                                            					<input type="hidden" id="orgCompany" name="orgCompany" class="form-control" readonly="readonly" >
		                                            					<input type="hidden" id="orgUserName" name="userName" class="form-control" readonly="readonly" >
		                                            					<input type="hidden" id="orgUserAllName" name="allName" class="form-control" readonly="readonly" >
									                            	</div>
									                        		<div class="form-group row">
                                            							<span class="col-md-3 input-group-addon" for="select">部门</span>
											                            <select id="orgDepartmentId" name="orgDepartmentId" class="col-md-9 form-control">
										                                    <option value="">-请选择-</option>
										                                </select>
		                                            					<input type="hidden" id="orgDepartment" name="orgDepartment" class="form-control" readonly="readonly" >
									                            	</div>
									                        		<div class="form-group row">
                                            							<span class="col-md-3 input-group-addon" for="select">科室</span>
											                            <select id="orgOfficeId" name="orgOfficeId" class="col-md-9 form-control">
										                                    <option value="">-请选择-</option>
										                                </select>
		                                            					<input type="hidden" id="orgOffice" name="orgOffice" class="form-control" readonly="readonly" >
									                            	</div>
									                        		<div class="form-group row">
                                            							<span class="col-md-3 input-group-addon" for="select">群组</span>
											                            <select id="orgGroupId" name="orgGroupId" class="col-md-9 form-control">
										                                    <option value="0">-请选择-</option>
										                                </select>
		                                            					<input type="hidden" id="orgGroup" name="orgGroup" class="form-control" readonly="readonly" >
									                            	</div>
									                        		<div class="form-group row">
                                            							<span class="col-md-3 input-group-addon" for="select">子组</span>
											                            <select id="orgSubGroupId" name="orgSubGroupId" class="col-md-9 form-control">
										                                    <option value="0">-请选择-</option>
										                                </select>
		                                            					<input type="hidden" id="orgSubGroup" name="orgSubGroup" class="form-control" readonly="readonly" >
									                            	</div>
									                        		<div align="center">
										                        		<button type="button" class="btn btn-primary" onClick="javascript:addUserOrg()"><i class="fa fa-search"></i> 添 加 </button>
									                            	</div>
								                            	</div>
									                        	<div class="col-md-8">
										                        	<table class="display" id="userOrgList" style="width: 100%;">
																		 <thead>
																		 	<tr>
																                <th>单位</th>
																                <th>部门</th>
																                <th>科室</th>
																                <th>群组</th>
																                <th>状态</th>
																                <th>操作</th>
																            </tr>
																		 </thead>
																		 <tbody></tbody>
																	</table>
								                            	</div>
							                        		</div>
							                        		</form>
								                        </div>									                    	
								                        <div class="tab-pane" id="rolePanel" role="tabpanel">
								                        	<div class="form-group row">
								                            	<div class="input-group col-md-5">
								                            		<table class="display" id="userOrgRoleOptionList" style="width: 100%;">
								                            			 <thead>
																		 	<tr>
																                <th>单位</th>
																                <th>部门</th>
																                <th>科室</th>
																                <th>群组</th>
																                <th>状态</th>
																                <th>操作</th>
																            </tr>
																		 </thead>
																		 <tbody></tbody>
								                            		</table>
								                            	</div>
								                            	<div class="input-group col-md-2">
								                            		<div>
								                            			<select id="selRolesId" name="rolesId">
								                            				<option value = "0"> 1</option>
								                            				<option value = "1"> 2</option>
								                            				<option value = "2"> 3</option>
								                            			</select>
								                            		</div>
								                            		<div>
								                            			<button type="button" class="btn btn-primary" onClick="javascript:addUserOrgRoles()"> 添加  </button>
								                            		</div>
								                            	</div>
								                            	<div class="input-group col-md-5">
								                            		<table class="display" id="userOrgRoleList" style="width: 100%;">
								                            			 <thead>
																		 	<tr>
																                <th>单位</th>
																                <th>部门</th>
																                <th>科室</th>
																                <th>群组</th>
																                <th>角色</th>
																                <th>状态</th>
																                <th>操作</th>
																            </tr>
																		 </thead>
																		 <tbody></tbody>
								                            		</table>
								                            	</div>
								                            </div>
								                        </div>
								                        <div class="tab-pane" id="levelPanel" role="tabpanel">
								                        	<div class="form-group row">
								                        		<div class="input-group col-md-5">
								                        			<table class="display" id="corePermissionList" style="width: 100%;">
								                            			 <thead>
																		 	<tr>
																                <th>id</th>
																                <th>name</th>
																                <th>code</th>
																                <th>id</th>
																                <th>状态</th>
																                <th>操作</th>
																            </tr>
																		 </thead>
																		 <tbody></tbody>
								                            		</table>
								                            	</div>
								                            	<div class="input-group col-md-2">
								                            		
								                            	</div>
								                            	<div class="input-group col-md-5">
								                        			<table class="display" id="userPermissionList" style="width: 100%;">
								                            			 <thead>
																		 	<tr>
																                <th>id</th>
																                <th>name</th>
																                <th>code</th>
																                <th>id</th>
																                <th>状态</th>
																                <th>操作</th>
																            </tr>
																		 </thead>
																		 <tbody></tbody>
								                            		</table>
								                            	</div>
								                            </div>
								                            		
								                        </div>
						                        	</div>
						                        </div>
		                                	</div>
	                                </div>
	                    		 </div>
	                    	</div>	                        
	                    </div>
	                </div>
	            </div>
	            <!-- /.conainer-fluid -->
	        </main>
	        <!--Main Right Tab panes Start -->
	        <aside class="aside-menu">
	            <ul class="nav nav-tabs" role="tablist">
	                <li class="nav-item">
	                    <a class="nav-link active" data-toggle="tab" href="#timeline" role="tab"><i class="icon-list"></i></a>
	                </li>
	                <li class="nav-item">
	                    <a class="nav-link" data-toggle="tab" href="#messages" role="tab"><i class="icon-speech"></i></a>
	                </li>
	                <li class="nav-item">
	                    <a class="nav-link" data-toggle="tab" href="#settings" role="tab"><i class="icon-settings"></i></a>
	                </li>
	            </ul>	
	            <div class="tab-content">
	                <div class="tab-pane active" id="timeline" role="tabpanel">
	                    <div class="callout m-0 py-h text-muted text-center bg-faded text-uppercase">
	                        <small><b>Today</b>
	                        </small>
	                    </div>
	                    <hr class="transparent mx-1 my-0">
	                    <div class="callout callout-warning m-0 py-1">
	                        <div class="avatar float-right">
	                            <img src="${pageContext.request.contextPath}/uicore/img/avatars/7.jpg" class="img-avatar" alt="admin@bootstrapmaster.com">
	                        </div>
	                        <div>Meeting with
	                            <strong>Lucas</strong>
	                        </div>
	                        <small class="text-muted mr-1"><i class="icon-calendar"></i>&nbsp; 1 - 3pm</small>
	                        <small class="text-muted"><i class="icon-location-pin"></i>&nbsp; Palo Alto, CA</small>
	                    </div>
	                    <hr class="mx-1 my-0">
	                    <div class="callout callout-info m-0 py-1">
	                        <div class="avatar float-right">
	                            <img src="${pageContext.request.contextPath}/uicore/img/avatars/4.jpg" class="img-avatar" alt="admin@bootstrapmaster.com">
	                        </div>
	                        <div>Skype with
	                            <strong>Megan</strong>
	                        </div>
	                        <small class="text-muted mr-1"><i class="icon-calendar"></i>&nbsp; 4 - 5pm</small>
	                        <small class="text-muted"><i class="icon-social-skype"></i>&nbsp; On-line</small>
	                    </div>
	                    <hr class="transparent mx-1 my-0">
	                    <div class="callout m-0 py-h text-muted text-center bg-faded text-uppercase">
	                        <small><b>Tomorrow</b>
	                        </small>
	                    </div>
	                    <hr class="transparent mx-1 my-0">
	                    <div class="callout callout-danger m-0 py-1">
	                        <div>New UI Project -
	                            <strong>deadline</strong>
	                        </div>
	                        <small class="text-muted mr-1"><i class="icon-calendar"></i>&nbsp; 10 - 11pm</small>
	                        <small class="text-muted"><i class="icon-home"></i>&nbsp; creativeLabs HQ</small>
	                        <div class="avatars-stack mt-h">
	                            <div class="avatar avatar-xs">
	                                <img src="${pageContext.request.contextPath}/uicore/img/avatars/2.jpg" class="img-avatar" alt="admin@bootstrapmaster.com">
	                            </div>
	                            <div class="avatar avatar-xs">
	                                <img src="${pageContext.request.contextPath}/uicore/img/avatars/3.jpg" class="img-avatar" alt="admin@bootstrapmaster.com">
	                            </div>
	                            <div class="avatar avatar-xs">
	                                <img src="${pageContext.request.contextPath}/uicore/img/avatars/4.jpg" class="img-avatar" alt="admin@bootstrapmaster.com">
	                            </div>
	                            <div class="avatar avatar-xs">
	                                <img src="${pageContext.request.contextPath}/uicore/img/avatars/5.jpg" class="img-avatar" alt="admin@bootstrapmaster.com">
	                            </div>
	                            <div class="avatar avatar-xs">
	                                <img src="${pageContext.request.contextPath}/uicore/img/avatars/6.jpg" class="img-avatar" alt="admin@bootstrapmaster.com">
	                            </div>
	                        </div>
	                    </div>
	                    <hr class="mx-1 my-0">
	                    <div class="callout callout-success m-0 py-1">
	                        <div>
	                            <strong>#10 Startups.Garden</strong>Meetup</div>
	                        <small class="text-muted mr-1"><i class="icon-calendar"></i>&nbsp; 1 - 3pm</small>
	                        <small class="text-muted"><i class="icon-location-pin"></i>&nbsp; Palo Alto, CA</small>
	                    </div>
	                    <hr class="mx-1 my-0">
	                    <div class="callout callout-primary m-0 py-1">
	                        <div>
	                            <strong>Team meeting</strong>
	                        </div>
	                        <small class="text-muted mr-1"><i class="icon-calendar"></i>&nbsp; 4 - 6pm</small>
	                        <small class="text-muted"><i class="icon-home"></i>&nbsp; creativeLabs HQ</small>
	                        <div class="avatars-stack mt-h">
	                            <div class="avatar avatar-xs">
	                                <img src="${pageContext.request.contextPath}/uicore/img/avatars/2.jpg" class="img-avatar" alt="admin@bootstrapmaster.com">
	                            </div>
	                            <div class="avatar avatar-xs">
	                                <img src="${pageContext.request.contextPath}/uicore/img/avatars/3.jpg" class="img-avatar" alt="admin@bootstrapmaster.com">
	                            </div>
	                            <div class="avatar avatar-xs">
	                                <img src="${pageContext.request.contextPath}/uicore/img/avatars/4.jpg" class="img-avatar" alt="admin@bootstrapmaster.com">
	                            </div>
	                            <div class="avatar avatar-xs">
	                                <img src="${pageContext.request.contextPath}/uicore/img/avatars/5.jpg" class="img-avatar" alt="admin@bootstrapmaster.com">
	                            </div>
	                            <div class="avatar avatar-xs">
	                                <img src="${pageContext.request.contextPath}/uicore/img/avatars/6.jpg" class="img-avatar" alt="admin@bootstrapmaster.com">
	                            </div>
	                            <div class="avatar avatar-xs">
	                                <img src="${pageContext.request.contextPath}/uicore/img/avatars/7.jpg" class="img-avatar" alt="admin@bootstrapmaster.com">
	                            </div>
	                            <div class="avatar avatar-xs">
	                                <img src="${pageContext.request.contextPath}/uicore/img/avatars/8.jpg" class="img-avatar" alt="admin@bootstrapmaster.com">
	                            </div>
	                        </div>
	                    </div>
	                    <hr class="mx-1 my-0">
	                </div>
	                <div class="tab-pane p-1" id="messages" role="tabpanel">
	                    <div class="message">
	                        <div class="py-1 pb-3 mr-1 float-left">
	                            <div class="avatar">
	                                <img src="${pageContext.request.contextPath}/uicore/img/avatars/7.jpg" class="img-avatar" alt="admin@bootstrapmaster.com">
	                                <span class="avatar-status badge-success"></span>
	                            </div>
	                        </div>
	                        <div>
	                            <small class="text-muted">Lukasz Holeczek</small>
	                            <small class="text-muted float-right mt-q">1:52 PM</small>
	                        </div>
	                        <div class="text-truncate font-weight-bold">Lorem ipsum dolor sit amet</div>
	                        <small class="text-muted">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt...</small>
	                    </div>
	                    <hr>
	                    <div class="message">
	                        <div class="py-1 pb-3 mr-1 float-left">
	                            <div class="avatar">
	                                <img src="${pageContext.request.contextPath}/uicore/img/avatars/7.jpg" class="img-avatar" alt="admin@bootstrapmaster.com">
	                                <span class="avatar-status badge-success"></span>
	                            </div>
	                        </div>
	                        <div>
	                            <small class="text-muted">Lukasz Holeczek</small>
	                            <small class="text-muted float-right mt-q">1:52 PM</small>
	                        </div>
	                        <div class="text-truncate font-weight-bold">Lorem ipsum dolor sit amet</div>
	                        <small class="text-muted">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt...</small>
	                    </div>
	                    <hr>
	                    <div class="message">
	                        <div class="py-1 pb-3 mr-1 float-left">
	                            <div class="avatar">
	                                <img src="${pageContext.request.contextPath}/uicore/img/avatars/7.jpg" class="img-avatar" alt="admin@bootstrapmaster.com">
	                                <span class="avatar-status badge-success"></span>
	                            </div>
	                        </div>
	                        <div>
	                            <small class="text-muted">Lukasz Holeczek</small>
	                            <small class="text-muted float-right mt-q">1:52 PM</small>
	                        </div>
	                        <div class="text-truncate font-weight-bold">Lorem ipsum dolor sit amet</div>
	                        <small class="text-muted">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt...</small>
	                    </div>
	                    <hr>
	                    <div class="message">
	                        <div class="py-1 pb-3 mr-1 float-left">
	                            <div class="avatar">
	                                <img src="${pageContext.request.contextPath}/uicore/img/avatars/7.jpg" class="img-avatar" alt="admin@bootstrapmaster.com">
	                                <span class="avatar-status badge-success"></span>
	                            </div>
	                        </div>
	                        <div>
	                            <small class="text-muted">Lukasz Holeczek</small>
	                            <small class="text-muted float-right mt-q">1:52 PM</small>
	                        </div>
	                        <div class="text-truncate font-weight-bold">Lorem ipsum dolor sit amet</div>
	                        <small class="text-muted">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt...</small>
	                    </div>
	                    <hr>
	                    <div class="message">
	                        <div class="py-1 pb-3 mr-1 float-left">
	                            <div class="avatar">
	                                <img src="${pageContext.request.contextPath}/uicore/img/avatars/7.jpg" class="img-avatar" alt="admin@bootstrapmaster.com">
	                                <span class="avatar-status badge-success"></span>
	                            </div>
	                        </div>
	                        <div>
	                            <small class="text-muted">Lukasz Holeczek</small>
	                            <small class="text-muted float-right mt-q">1:52 PM</small>
	                        </div>
	                        <div class="text-truncate font-weight-bold">Lorem ipsum dolor sit amet</div>
	                        <small class="text-muted">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt...</small>
	                    </div>
	                </div>
	                <div class="tab-pane p-1" id="settings" role="tabpanel">
	                    <h6>Settings</h6>
	
	                    <div class="aside-options">
	                        <div class="clearfix mt-2">
	                            <small><b>Option 1</b>
	                            </small>
	                            <label class="switch switch-text switch-pill switch-success switch-sm float-right">
	                                <input type="checkbox" class="switch-input" checked="">
	                                <span class="switch-label" data-on="On" data-off="Off"></span>
	                                <span class="switch-handle"></span>
	                            </label>
	                        </div>
	                        <div>
	                            <small class="text-muted">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</small>
	                        </div>
	                    </div>
	
	                    <div class="aside-options">
	                        <div class="clearfix mt-1">
	                            <small><b>Option 2</b>
	                            </small>
	                            <label class="switch switch-text switch-pill switch-success switch-sm float-right">
	                                <input type="checkbox" class="switch-input">
	                                <span class="switch-label" data-on="On" data-off="Off"></span>
	                                <span class="switch-handle"></span>
	                            </label>
	                        </div>
	                        <div>
	                            <small class="text-muted">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</small>
	                        </div>
	                    </div>
	
	                    <div class="aside-options">
	                        <div class="clearfix mt-1">
	                            <small><b>Option 3</b>
	                            </small>
	                            <label class="switch switch-text switch-pill switch-success switch-sm float-right">
	                                <input type="checkbox" class="switch-input">
	                                <span class="switch-label" data-on="On" data-off="Off"></span>
	                                <span class="switch-handle"></span>
	                            </label>
	                        </div>
	                    </div>
	
	                    <div class="aside-options">
	                        <div class="clearfix mt-1">
	                            <small><b>Option 4</b>
	                            </small>
	                            <label class="switch switch-text switch-pill switch-success switch-sm float-right">
	                                <input type="checkbox" class="switch-input" checked="">
	                                <span class="switch-label" data-on="On" data-off="Off"></span>
	                                <span class="switch-handle"></span>
	                            </label>
	                        </div>
	                    </div>
	
	                    <hr>
	                    <h6>System Utilization</h6>	
	                    <div class="text-uppercase mb-q mt-2">
	                        <small><b>CPU Usage</b>
	                        </small>
	                    </div>
	                    <div class="progress progress-xs">
	                        <div class="progress-bar bg-info" role="progressbar" style="width: 25%" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100"></div>
	                    </div>
	                    <small class="text-muted">348 Processes. 1/4 Cores.</small>	
	                    <div class="text-uppercase mb-q mt-h">
	                        <small><b>Memory Usage</b>
	                        </small>
	                    </div>
	                    <div class="progress progress-xs">
	                        <div class="progress-bar bg-warning" role="progressbar" style="width: 70%" aria-valuenow="70" aria-valuemin="0" aria-valuemax="100"></div>
	                    </div>
	                    <small class="text-muted">11444GB/16384MB</small>	
	                    <div class="text-uppercase mb-q mt-h">
	                        <small><b>SSD 1 Usage</b>
	                        </small>
	                    </div>
	                    <div class="progress progress-xs">
	                        <div class="progress-bar bg-danger" role="progressbar" style="width: 95%" aria-valuenow="95" aria-valuemin="0" aria-valuemax="100"></div>
	                    </div>
	                    <small class="text-muted">243GB/256GB</small>	
	                    <div class="text-uppercase mb-q mt-h">
	                        <small><b>SSD 2 Usage</b>
	                        </small>
	                    </div>
	                    <div class="progress progress-xs">
	                        <div class="progress-bar bg-success" role="progressbar" style="width: 10%" aria-valuenow="10" aria-valuemin="0" aria-valuemax="100"></div>
	                    </div>
	                    <small class="text-muted">25GB/256GB</small>
	                </div>
	            </div>
	            <!--Main Right Tab panes end -->
	        </aside>		
	    </div>		
	    <footer class="app-footer">
			Copyright &copy; 2017.Company name All rights reserved.<a target="_blank" href="http://www.mycodes.net/">&#x7F51;&#x9875;&#x6A21;&#x677F;</a>    
		</footer>
	    <!-- Bootstrap and necessary plugins   [jQuery v3.1.0] -->
		<script src="${pageContext.request.contextPath}/uicore/assets/js/libs/jquery.min.js"></script>
		<script src="${pageContext.request.contextPath}/uicore/assets/js/libs/tether.min.js"></script>
		<script src="${pageContext.request.contextPath}/uicore/assets/js/libs/bootstrap.min.js"></script>
		<script src="${pageContext.request.contextPath}/uicore/assets/js/libs/pace.min.js"></script>
		<!-- Plugins and scripts required by all views -->
		<script src="${pageContext.request.contextPath}/uicore/assets/js/libs/Chart.min.js"></script>
	    <!-- GenesisUI main scripts -->	
	    <script src="${pageContext.request.contextPath}/uicore/js/app.js"></script>		
		<!-- / datetime picker -->
		<script src='${pageContext.request.contextPath}/jqueryjs/moment/moment.min.js' ></script>
	    <script src='${pageContext.request.contextPath}/jqueryjs/datetimepicker/bootstrap-datetimepicker.min.js' ></script>
	    <!-- jquery datatable -->
	    <script src="${pageContext.request.contextPath}/jqueryjs/jquery.dataTables.min.js"></script>
	    <script >
	    	var userName ="";
	    	var tableUserOrgOption="";
	    	var tableUserOrgRoleOption="";
	    	var tableUserPermissionOption="";
	    	var tableCorePermissionOption="";
	    	$(function(){
        		var itemid =  getUrlParam("ticketId");
        		if(itemid==null){
        			alert("未获取到人员账号");
        		}else{
        			initUserInfos(itemid);
        			selectOrgCompanyInit();
        			initUserOrgRoleSelect();
        		}
        		
			    $('#datetimepicker2').datetimepicker({  
			        format: 'YYYY-MM-DD hh:mm',  
			        locale: moment.locale('zh-cn')  
			    });  
			    $("#orgCompanyId").change(function(){
			    	console.log($(this).val() + " " + $("#orgCompanyId").find("option:selected").text());
			    	$("#orgCompany").val($("#orgCompanyId").find("option:selected").text());
			    	selectOrgDepartmentInit($("#orgCompanyId").val());
				});
			    $("#orgDepartmentId").change(function(){
			    	console.log($(this).val());
			    	$("#orgDepartment").val($("#orgDepartmentId").find("option:selected").text());
			    	selectOrgOfficeInit($("#orgDepartmentId").val());
				});
			    $("#orgOfficeId").change(function(){
			    	console.log($(this).val());
			    	$("#orgOffice").val($("#orgOfficeId").find("option:selected").text());
			    	selectOrgGroupInit($("#orgOfficeId").val());
				});
			    $("#orgGroupId").change(function(){
			    	console.log($(this).val());
			    	$("#orgGroup").val($("#orgGroupId").find("option:selected").text());
			    	//selectOrgDepartmentInit($("#orgGroupId").val());
				});
				
				//datatable user-org option selected
				$('#userOrgRoleOptionList tbody').on( 'click', 'tr', function () {
			        $(this).toggleClass('selected');
			    } );
				
			    var table = $("#userOrgList").DataTable({
			    	language: {
		                "processing": "数据加载中，请稍等...", // 当前页显示多少条
		                "lengthMenu": "显示 _MENU_ 条记录", // _START_（当前页的第一条的序号） ,_END_（当前页的最后一条的序号）,_TOTAL_（筛选后的总件数）,
		                "info": "显示页 _PAGE_ / _PAGES_",// _MAX_(总件数),_PAGE_(当前页号),_PAGES_（总页数）
		                "emptyTable": "未查询到数据...",// 没有数据的显示（可选），如果没指定，会用zeroRecords的内容
		                "zeroRecords": "未查询到匹配的数据",// 筛选后，没有数据的表示信息，注意emptyTable优先级更高
		                //"thousands": "'",// 千分位的符号，只对显示有效，默认就是","  一般不要改写
		                //"decimal": "-",// 小数点位的符号，对输入解析有影响，默认就是"." 一般不要改写
		                // 翻页按钮文字控制
		                "paginate": {
		                    "first": "首页",
		                    "last": "末页",
		                    "next": "下一页",
		                    "previous": "上一页"
		                },
		                "loadingRecords": "加载中 - 请等待..." // Client-Side用，Server-Side不用这个属性
		            },
		            autoWidth:true,
		            //bAutoWidth: true,	//自动宽度
		           	processing: true,  //隐藏加载提示,自行处理  
					serverSide: true,  //启用服务器端分页  
					searching: false,  //禁用原生搜索  
					search: { "搜索": ""  },
					rowId: 'staffId',
					bLengthChange: false,   //去掉每页显示多少条数据方法
                    pageLength:10,
		            ajax: function (data, callback, settings) {  
                        //封装请求参数  
                        var param = {};  
		                param.opportunityNO ="hellow" ;//$('#txtSearch').val();
                        param.keyword = data.search.value;  
                        param.userName = userName;
                        param.limit = data.length;//页面显示记录条数，在页面显示每页显示多少项的时候  
                        param.start = data.start;//开始的记录序号  
                        param.page = (data.start / data.length)+1;//当前页码
                        //console.log(param);  
                        //ajax请求数据  
                        $.ajax({  
                            type: "POST",  
                            url: "${pageContext.request.contextPath}/userOrgCon/getUserOrgList.action",
                            cache: false,  //禁用缓存  
                            data: param,  //传入组装的参数  
                            dataType: "json",  
                            success: function (result) {
                                console.log(data.length +"-");  
                                //封装返回数据  
                                var returnData = {};
                                returnData.draw = data.draw;//这里直接自行返回了draw计数器,应该由后台返回
                                returnData.recordsTotal = result.total;//返回数据全部记录  
                                returnData.recordsFiltered = result.total;//后台不实现过滤功能，每次查询均视作全部结果  
                                returnData.data = result.rows;//返回的数据列表  
                                //调用DataTables提供的callback方法，代表数据已封装完成并传回DataTables进行渲染  
                                //此时的数据需确保正确无误，异常判断应在执行此回调前自行处理完毕  
                                callback(returnData);
                            }
                        });  
                    },
			    	"columns": [
				    	{ "data": "orgCompany" },
				    	{ "data": "orgDepartment" },
				    	{ "data": "orgOffice" },
				    	{ "data": "orgGroup" },
				    	{ "data": "valid" , 
				    		render:function(date,full) {  
                                var content = null;  
                                if(date == 0) {  
                                    content = '不可用';  
                                } else {  
                                    content = '可用';  
                                }  
                                return content;  
                            }  
                        },  
                        {   bSortable : false,    
                            visible : true,   
                            data : "orgId",       
                            render : function(data, type, full) {    
                                var content = "<a href='coreOrganizationEdit.jsp?ticketId=" + data + "'>查看</a>";
                                return content;    
                            }     
                        } 
			    	]
			    });
			    // Apply the search
			    table.columns().every( function () {
			        var that = this;
			        $( 'input', this.footer() ).on( 'keyup change', function () {
			            if ( that.search() !== this.value ) {
			                that.search( this.value ).draw();
			            }
			        } );
			    } );
			    
			    // user-org option
			    tableUserOrgOption = $("#userOrgRoleOptionList").DataTable({
			    	language: {
		                "processing": "数据加载中，请稍等...", // 当前页显示多少条
		                "lengthMenu": "显示 _MENU_ 条记录", // _START_（当前页的第一条的序号） ,_END_（当前页的最后一条的序号）,_TOTAL_（筛选后的总件数）,
		                "info": "显示页 _PAGE_ / _PAGES_",// _MAX_(总件数),_PAGE_(当前页号),_PAGES_（总页数）
		                "emptyTable": "未查询到数据...",// 没有数据的显示（可选），如果没指定，会用zeroRecords的内容
		                "zeroRecords": "未查询到匹配的数据",// 筛选后，没有数据的表示信息，注意emptyTable优先级更高
		                "paginate": {
		                    "first": "首页",
		                    "last": "末页",
		                    "next": "下一页",
		                    "previous": "上一页"
		                },
		                "loadingRecords": "加载中 - 请等待..." // Client-Side用，Server-Side不用这个属性
		            },
		            autoWidth:true,
		            //bAutoWidth: true,	//自动宽度
		           	processing: true,  //隐藏加载提示,自行处理  
					serverSide: true,  //启用服务器端分页  
					searching: false,  //禁用原生搜索  
					search: { "搜索": ""  },
					rowId: 'staffId',
					bLengthChange: false,   //去掉每页显示多少条数据方法
                    pageLength:10,
		            ajax: function (data, callback, settings) {  
                        //封装请求参数  
                        var param = {};  
		                param.opportunityNO ="hellow" ;//$('#txtSearch').val();
                        param.keyword = data.search.value;  
                        param.userName = userName;
                        param.limit = data.length;//页面显示记录条数，在页面显示每页显示多少项的时候  
                        param.start = data.start;//开始的记录序号  
                        param.page = (data.start / data.length)+1;//当前页码
                        //console.log(param);  
                        //ajax请求数据  
                        $.ajax({  
                            type: "POST",  
                            url: "${pageContext.request.contextPath}/userOrgCon/getUserOrgList.action",
                            cache: false,  //禁用缓存  
                            data: param,  //传入组装的参数  
                            dataType: "json",  
                            success: function (result) {
                                console.log(data.length +"-");  
                                //封装返回数据  
                                var returnData = {};
                                returnData.draw = data.draw;//这里直接自行返回了draw计数器,应该由后台返回
                                returnData.recordsTotal = result.total;//返回数据全部记录  
                                returnData.recordsFiltered = result.total;//后台不实现过滤功能，每次查询均视作全部结果  
                                returnData.data = result.rows;//返回的数据列表  
                                //调用DataTables提供的callback方法，代表数据已封装完成并传回DataTables进行渲染  
                                //此时的数据需确保正确无误，异常判断应在执行此回调前自行处理完毕  
                                callback(returnData);
                            }
                        });  
                    },
			    	"columns": [
				    	{ "data": "orgCompany" },
				    	{ "data": "orgDepartment" },
				    	{ "data": "orgOffice" },
				    	{ "data": "orgGroup" },
				    	{ "data": "valid" , 
				    		render:function(date,full) {  
                                var content = null;  
                                if(date == 0) {  
                                    content = '不可用';  
                                } else {  
                                    content = '可用';  
                                }  
                                return content;  
                            }  
                        },  
                        {   bSortable : false,    
                            visible : true,   
                            data : "orgId",       
                            render : function(data, type, full) {    
                                var content = "<a href='coreOrganizationEdit.jsp?ticketId=" + data + "'>查看</a>";
                                return content;    
                            }     
                        } 
			    	]
			    });
			    // Apply the search
			    tableUserOrgOption.columns().every( function () {
			        var that = this;
			        $( 'input', this.footer() ).on( 'keyup change', function () {
			            if ( that.search() !== this.value ) {
			                that.search( this.value ).draw();
			            }
			        } );
			    } );
			    
			    // user-org option
			    tableUserOrgRoleOption = $("#userOrgRoleList").DataTable({
			    	language: {
		                "processing": "数据加载中，请稍等...", // 当前页显示多少条
		                "lengthMenu": "显示 _MENU_ 条记录", // _START_（当前页的第一条的序号） ,_END_（当前页的最后一条的序号）,_TOTAL_（筛选后的总件数）,
		                "info": "显示页 _PAGE_ / _PAGES_",// _MAX_(总件数),_PAGE_(当前页号),_PAGES_（总页数）
		                "emptyTable": "未查询到数据...",// 没有数据的显示（可选），如果没指定，会用zeroRecords的内容
		                "zeroRecords": "未查询到匹配的数据",// 筛选后，没有数据的表示信息，注意emptyTable优先级更高
		                "paginate": {
		                    "first": "首页",
		                    "last": "末页",
		                    "next": "下一页",
		                    "previous": "上一页"
		                },
		                "loadingRecords": "加载中 - 请等待..." // Client-Side用，Server-Side不用这个属性
		            },
		            autoWidth:true,
		            //bAutoWidth: true,	//自动宽度
		           	processing: true,  //隐藏加载提示,自行处理  
					serverSide: true,  //启用服务器端分页  
					searching: false,  //禁用原生搜索  
					search: { "搜索": ""  },
					rowId: 'staffId',
					bLengthChange: false,   //去掉每页显示多少条数据方法
                    pageLength:10,
		            ajax: function (data, callback, settings) {  
                        //封装请求参数  
                        var param = {};  
		                param.opportunityNO ="hellow" ;//$('#txtSearch').val();
                        param.keyword = data.search.value;  
                        param.userName = userName;
                        param.limit = data.length;//页面显示记录条数，在页面显示每页显示多少项的时候  
                        param.start = data.start;//开始的记录序号  
                        param.page = (data.start / data.length)+1;//当前页码
                        //console.log(param);  
                        //ajax请求数据  
                        $.ajax({  
                            type: "POST",  
                            url: "${pageContext.request.contextPath}/userOrgRoleCon/getRoles.action",
                            cache: false,  //禁用缓存  
                            data: param,  //传入组装的参数  
                            dataType: "json",  
                            success: function (result) {
                                console.log(data.length +"-");  
                                //封装返回数据  
                                var returnData = {};
                                returnData.draw = data.draw;//这里直接自行返回了draw计数器,应该由后台返回
                                returnData.recordsTotal = result.total;//返回数据全部记录  
                                returnData.recordsFiltered = result.total;//后台不实现过滤功能，每次查询均视作全部结果  
                                returnData.data = result.rows;//返回的数据列表  
                                callback(returnData);
                            }
                        });  
                    },
			    	"columns": [
				    	{ "data": "orgCompany" },
				    	{ "data": "orgDepartment" },
				    	{ "data": "orgOffice" },
				    	{ "data": "orgGroup" },
				    	{ "data": "rolesName" },
				    	{ "data": "valid" , 
				    		render:function(date,full) {  
                                var content = null;  
                                if(date == 0) {  
                                    content = '不可用';  
                                } else {  
                                    content = '可用';  
                                }  
                                return content;  
                            }  
                        },  
                        {   bSortable : false,    
                            visible : true,   
                            data : "orgId",       
                            render : function(data, type, full) {    
                                var content = "<a href='coreOrganizationEdit.jsp?ticketId=" + data + "'>查看</a>";
                                return content;    
                            }     
                        } 
			    	]
			    });
			    // Apply the search
			    tableUserOrgRoleOption.columns().every( function () {
			        var that = this;
			        $( 'input', this.footer() ).on( 'keyup change', function () {
			            if ( that.search() !== this.value ) {
			                that.search( this.value ).draw();
			            }
			        } );
			    } );
			    
			    // user-org option
			    tableCorePermissionOption = $("#corePermissionList").DataTable({
			    	language: {
		                "processing": "数据加载中，请稍等...", // 当前页显示多少条
		                "lengthMenu": "显示 _MENU_ 条记录", // _START_（当前页的第一条的序号） ,_END_（当前页的最后一条的序号）,_TOTAL_（筛选后的总件数）,
		                "info": "显示页 _PAGE_ / _PAGES_",// _MAX_(总件数),_PAGE_(当前页号),_PAGES_（总页数）
		                "emptyTable": "未查询到数据...",// 没有数据的显示（可选），如果没指定，会用zeroRecords的内容
		                "zeroRecords": "未查询到匹配的数据",// 筛选后，没有数据的表示信息，注意emptyTable优先级更高
		                "paginate": {
		                    "first": "首页",
		                    "last": "末页",
		                    "next": "下一页",
		                    "previous": "上一页"
		                },
		                "loadingRecords": "加载中 - 请等待..." // Client-Side用，Server-Side不用这个属性
		            },
		            autoWidth:true,
		            //bAutoWidth: true,	//自动宽度
		           	processing: true,  //隐藏加载提示,自行处理  
					serverSide: true,  //启用服务器端分页  
					searching: false,  //禁用原生搜索  
					search: { "搜索": ""  },
					rowId: 'staffId',
					bLengthChange: false,   //去掉每页显示多少条数据方法
                    pageLength:10,
		            ajax: function (data, callback, settings) {  
                        //封装请求参数  
                        var param = {};  
		                param.opportunityNO ="hellow" ;//$('#txtSearch').val();
                        param.keyword = data.search.value;  
                        param.userName = userName;
                        param.limit = data.length;//页面显示记录条数，在页面显示每页显示多少项的时候  
                        param.start = data.start;//开始的记录序号  
                        param.page = (data.start / data.length)+1;//当前页码
                        //console.log(param);  
                        //ajax请求数据  
                        $.ajax({  
                            type: "POST",  
                            url: "${pageContext.request.contextPath}/permission/getPermissionList.action",
                            cache: false,  //禁用缓存  
                            data: param,  //传入组装的参数  
                            dataType: "json",  
                            success: function (result) {
                                console.log(data.length +"-");  
                                //封装返回数据  
                                var returnData = {};
                                returnData.draw = data.draw;//这里直接自行返回了draw计数器,应该由后台返回
                                returnData.recordsTotal = result.total;//返回数据全部记录  
                                returnData.recordsFiltered = result.total;//后台不实现过滤功能，每次查询均视作全部结果  
                                returnData.data = result.rows;//返回的数据列表  
                                callback(returnData);
                            }
                        });  
                    },
			    	"columns": [
				    	{ "data": "id" },
				    	{ "data": "name" },
				    	{ "data": "code" },
				    	{ "data": "permissionId" },
				    	{ "data": "valid" , 
				    		render:function(date,full) {  
                                var content = null;  
                                if(date == 0) {  
                                    content = '不可用';  
                                } else {  
                                    content = '可用';  
                                }  
                                return content;  
                            }  
                        },  
                        {   bSortable : false,    
                            visible : true,   
                            data : "orgId",       
                            render : function(data, type, full) {    
                                var content = "<a href='coreOrganizationEdit.jsp?ticketId=" + data + "'>查看</a>";
                                return content;    
                            }     
                        } 
			    	]
			    });
			    // Apply the search
			    tableCorePermissionOption.columns().every( function () {
			        var that = this;
			        $( 'input', this.footer() ).on( 'keyup change', function () {
			            if ( that.search() !== this.value ) {
			                that.search( this.value ).draw();
			            }
			        } );
			    } );
			    
			    // user-org option
			    tableUserPermissionOption = $("#userPermissionList").DataTable({
			    	language: {
		                "processing": "数据加载中，请稍等...", // 当前页显示多少条
		                "lengthMenu": "显示 _MENU_ 条记录", // _START_（当前页的第一条的序号） ,_END_（当前页的最后一条的序号）,_TOTAL_（筛选后的总件数）,
		                "info": "显示页 _PAGE_ / _PAGES_",// _MAX_(总件数),_PAGE_(当前页号),_PAGES_（总页数）
		                "emptyTable": "未查询到数据...",// 没有数据的显示（可选），如果没指定，会用zeroRecords的内容
		                "zeroRecords": "未查询到匹配的数据",// 筛选后，没有数据的表示信息，注意emptyTable优先级更高
		                "paginate": {
		                    "first": "首页",
		                    "last": "末页",
		                    "next": "下一页",
		                    "previous": "上一页"
		                },
		                "loadingRecords": "加载中 - 请等待..." // Client-Side用，Server-Side不用这个属性
		            },
		            autoWidth:true,
		            //bAutoWidth: true,	//自动宽度
		           	processing: true,  //隐藏加载提示,自行处理  
					serverSide: true,  //启用服务器端分页  
					searching: false,  //禁用原生搜索  
					search: { "搜索": ""  },
					rowId: 'staffId',
					bLengthChange: false,   //去掉每页显示多少条数据方法
                    pageLength:10,
		            ajax: function (data, callback, settings) {  
                        //封装请求参数  
                        var param = {};  
		                param.opportunityNO ="hellow" ;//$('#txtSearch').val();
                        param.keyword = data.search.value;  
                        param.userName = userName;
                        param.limit = data.length;//页面显示记录条数，在页面显示每页显示多少项的时候  
                        param.start = data.start;//开始的记录序号  
                        param.page = (data.start / data.length)+1;//当前页码
                        //console.log(param);  
                        //ajax请求数据  
                        $.ajax({  
                            type: "POST",  
                            url: "${pageContext.request.contextPath}/userPermission/getUserPermissionList.action",
                            cache: false,  //禁用缓存  
                            data: param,  //传入组装的参数  
                            dataType: "json",  
                            success: function (result) {
                                console.log(data.length +"-");  
                                //封装返回数据  
                                var returnData = {};
                                returnData.draw = data.draw;//这里直接自行返回了draw计数器,应该由后台返回
                                returnData.recordsTotal = result.total;//返回数据全部记录  
                                returnData.recordsFiltered = result.total;//后台不实现过滤功能，每次查询均视作全部结果  
                                returnData.data = result.rows;//返回的数据列表  
                                callback(returnData);
                            }
                        });  
                    },
			    	"columns": [
				    	{ "data": "id" },
				    	{ "data": "name" },
				    	{ "data": "code" },
				    	{ "data": "permissionId" },
				    	{ "data": "valid" , 
				    		render:function(date,full) {  
                                var content = null;  
                                if(date == 0) {  
                                    content = '不可用';  
                                } else {  
                                    content = '可用';  
                                }  
                                return content;  
                            }  
                        },  
                        {   bSortable : false,    
                            visible : true,   
                            data : "orgId",       
                            render : function(data, type, full) {    
                                var content = "<a href='coreOrganizationEdit.jsp?ticketId=" + data + "'>查看</a>";
                                return content;    
                            }     
                        } 
			    	]
			    });
			    // Apply the search
			    tableUserPermissionOption.columns().every( function () {
			        var that = this;
			        $( 'input', this.footer() ).on( 'keyup change', function () {
			            if ( that.search() !== this.value ) {
			                that.search( this.value ).draw();
			            }
			        } );
			    } );
			}); 
		
       		//获取url中的参数
	        function getUrlParam(name) {
	            var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
	            var r = window.location.search.substr(1).match(reg);  //匹配目标参数
	            if (r != null) return unescape(r[2]); return null; //返回参数值
	        };
	    	function initUserInfos(itemid){
	    		userName = itemid;
	    		$("#orgUserName").val(userName);
	    		//$("#orgCompany").val($("#orgCompanyId").find("option:selected").text());
	    		$.getJSON("${pageContext.request.contextPath}/people/getPeople.action",{userName:itemid},function(data){
	    			if(data !=null){
		        		for (var key in data.item){
		        			//alert(data.item[key]);
		        			$("#"+key).val(data.item[key]);
		        			$(":radio[name='"+key+"'][value='" + data.item[key] + "']").prop("checked", "checked");
						}
					}
	        	});
	    	}
	    	function applyUser(){
	    		var data = $("#userDetailForm").serialize();
				$.post("${pageContext.request.contextPath}/people/peopleModify.action",data,function(res){
					//获取返回结果，{"success":true}
					var re = eval("("+res+")");
					if(re.success){
						alert("提交成功！");
						//window.location.href='${pageContext.request.contextPath}/page/incidentManage.jsp';
					}else{
						alert("提交失败！请联系管理员！");
					};
				});
	    	}
	    	function addUserOrg(){
	    		$("#orgUserAllName").val($("#allName").val());
			    console.log($("#allName").val());
	    		var data = $("#userOrgDetailForm").serialize();
	    		$.post("${pageContext.request.contextPath}/userOrgCon/addUserOrg.action",data,function(res){
					//获取返回结果，{"success":true}
					var re = eval("("+res+")");
					if(re.success){
						alert("提交成功！");
						//window.location.href='${pageContext.request.contextPath}/page/incidentManage.jsp';
					}else{
						alert("提交失败！请联系管理员！");
					};
				});
	    	}
	    	function selectOrgCompanyInit(){
	    		$.getJSON("${pageContext.request.contextPath}/organization/getOrgCompany.action",{},function(data){
        			if(data !=null){
						$(data.rows).each(function(n,Row){
		             		$("#orgCompanyId").append( "<option value=\""+ Row.orgCompanyId +"\">"+ Row.orgCompany +"</option>" );
					    })
					}
				});
				selectOrgDepartmentInit();
	    	}
	    	function selectOrgDepartmentInit(companyId){
	    		$.getJSON("${pageContext.request.contextPath}/organization/getOrgDepartment.action",{companyId:companyId},function(data){
        			if(data !=null){
        				$("#orgDepartmentId").empty();
        				$("#orgDepartmentId").append( "<option value=\""+ "\">" + "-请选择-</option>" );
						$(data.rows).each(function(n,Row){
		             		$("#orgDepartmentId").append( "<option value=\""+ Row.orgDepartmentId +"\">"+ Row.orgDepartment +"</option>" );
					    })
					}
				});
	    	}
	    	function selectOrgOfficeInit(departmentId){
	    		$.getJSON("${pageContext.request.contextPath}/organization/getOrgOffice.action",{departmentId:departmentId},function(data){
        			if(data !=null){
        				$("#orgOfficeId").empty();
        				$("#orgOfficeId").append( "<option value=\""+ "\">" + "-请选择-</option>" );
						$(data.rows).each(function(n,Row){
		             		$("#orgOfficeId").append( "<option value=\""+ Row.orgOfficeId +"\">"+ Row.orgOffice +"</option>" );
					    })
					}
				});
	    	}
	    	function selectOrgGroupInit(officeId){
	    		$.getJSON("${pageContext.request.contextPath}/organization/getOrgGroup.action",{officeId:officeId},function(data){
        			if(data !=null){
        				$("#orgGroupId").empty();
        				$("#orgGroupId").append( "<option value=\""+ "\">" + "-请选择-</option>" );
						$(data.rows).each(function(n,Row){
		             		$("#orgGroupId").append( "<option value=\""+ Row.orgGroupId +"\">"+ Row.orgGroup +"</option>" );
					    })
					}
				});
	    	}
	    	function initUserOrgRoleSelect(){
	    		$.getJSON("${pageContext.request.contextPath}/role/rolesGet.action",{},function(data){
        			if(data !=null){
        				$("#selRolesId").empty();
        				$("#selRolesId").append( "<option value=\""+ "\">" + "-请选择-</option>" );
						$(data.rows).each(function(n,Row){
		             		$("#selRolesId").append( "<option value=\""+ Row.rolesId +"\">"+ Row.rolesName +"</option>" );
					    })
					}
				});
	    	}
	    	//
	    	function addUserOrgRoles(){
	    		var data = tableUserOrgOption.rows('.selected').data();
	    		console.log(tableUserOrgOption.rows('.selected').data());
	    		for(var i=0;i<tableUserOrgOption.rows('.selected').data().length;i++){
	    			console.log("select id " + tableUserOrgOption.rows('.selected').data()[i].allName );
	    			$.getJSON("${pageContext.request.contextPath}/userOrgRoleCon/addRoles.action",
	    				{
		    				rolesId : $("#selRolesId").val(),
		    				rolesName : $("#selRolesId").find("option:selected").text(),
		    				orgCompany : tableUserOrgOption.rows('.selected').data()[i].orgCompany,
						    orgCompanyId:tableUserOrgOption.rows('.selected').data()[i].orgCompanyId,
						    orgDepartment : tableUserOrgOption.rows('.selected').data()[i].orgDepartment,
						    orgDepartmentId : tableUserOrgOption.rows('.selected').data()[i].orgDepartmentId,
						    orgOffice : tableUserOrgOption.rows('.selected').data()[i].orgOffice,
						    orgOfficeId : tableUserOrgOption.rows('.selected').data()[i].orgOfficeId,
						    orgGroup : tableUserOrgOption.rows('.selected').data()[i].orgGroup,
						    orgGroupId : tableUserOrgOption.rows('.selected').data()[i].orgGroupId,
						    userName : tableUserOrgOption.rows('.selected').data()[i].userName,
						    allName : tableUserOrgOption.rows('.selected').data()[i].allName,
	    				},function(res){
		        			//var re = eval("("+res+")");
							if(res.success){
								alert("提交成功！");
								//window.location.href='${pageContext.request.contextPath}/page/incidentManage.jsp';
							}else{
								alert("提交失败！请联系管理员！");
							};
					}); 
	    		}
	    	}
	    	
	    	
	    	
	    </script>
	    
	    
	</body>
</html>